package com.xhsj.user.pms.workflow.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhsj.user.pms.workflow.domain.WorkflowComplete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface WorkflowCompleteMapper extends BaseMapper<WorkflowComplete> {
    // 删除历史表
    int deleteHiForDisclosureAndNodeId(@Param("hiForDisclosure") String hiForDisclosure, @Param("hiExecNode") String hiExecNode);

    // 删除历史表根据id
    int deleteHiForId(@Param("id") String id);
    // 查找历史节点记录
    List<Map<String,Object>> getNodeRecord(@Param("disclosureId") String disclosureId);

    /**
     * 通过id删除历史数据
     * @author 苏小林
     * @date 2021/1/13 17:53
     * @param: id
     */
    void delExecProgressById(@Param("id") String id);

    void deleteHiByDisclosureIdAndUserId(@Param("disclosureId") String disclosureId,@Param("subtract")  List<Long> subtract);
    // 当前所在的节点
    Integer getCurrentNodeNum(@Param("disclosureId") String disclosureId);

    // 删除与之交底书对应历史表待审核的数据 排除修改后的评审会成员仍有的就成员
    int deleteHiForDisclosureAndNodeIdAndDealUserId(@Param("hiForDisclosure") String hiForDisclosure, @Param("hiExecNode") String hiExecNode, @Param("collect") List<Long> collect);
}